import React, { useEffect, useRef } from 'react'
import Qrcode from 'qrcode'
type Props = {}

const Index = (props: Props) => {
	const c = useRef<HTMLCanvasElement>(null)

	useEffect(() => {
		Qrcode.toCanvas(c.current as HTMLCanvasElement,  '12312312')
	}, [])

	return (
		<div>
			<canvas ref={ c }></canvas>
		</div>
	)
}

export default Index